package com.taotao.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.taotao.common.result.EUDataGridResult;
import com.taotao.mapper.TbItemParamMapper;
import com.taotao.pojo.TbItemParam;
import com.taotao.pojo.TbItemParamExample;
import com.taotao.service.ItemParamService;
@Service
public class ItemParamServiceImpl implements ItemParamService {
	@Autowired
	private TbItemParamMapper itemParamMapper;
	@Override
	public EUDataGridResult getItemParamList(int page,int rows) throws Exception {
		EUDataGridResult result=new EUDataGridResult();
		TbItemParamExample example=new TbItemParamExample();
		PageHelper.startPage(page, rows);
		List<TbItemParam> list= itemParamMapper.selectByExampleWithBLOBs(example);
		result.setRows(list);
		PageInfo<TbItemParam> pageInfo=new PageInfo<>(list);
		result.setTotal(pageInfo.getTotal());
		return result;
	}

}
